<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>
<%@ page import="org.apache.shiro.SecurityUtils"  %>
<%@ page import="com.hoo.auth.MyRealm.UserContext" %>
<% UserContext userContext = (UserContext) SecurityUtils.getSubject().getPrincipal(); %>
<!-- topbar begin -->

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
	<title>首页</title>
    <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="cache-control" content="no-cache">
    <meta http-equiv="expires" content="0">    
    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
    <meta http-equiv="description" content="This is my page">
  </head>
  
  <body>
        <shiro:hasPermission name="/userList">
        <a href="account/userList.do">查询所有</a><br/>
        </shiro:hasPermission>
        <shiro:hasPermission name="sign_up">
        <a href="sign_up">添加</a><br/>
        </shiro:hasPermission>
        <shiro:hasPermission name="/home">
        <a href="account/get.do?id=25">查询</a><br/>
        </shiro:hasPermission>
        <a href="sign_in">登录</a><br/>
        
        
     <% if (userContext != null) {%> <a href="sign_out">退出</a>
     <%} %>
  </body>
</html>